Warning: mail() [function.mail]: SMTP server response: 530 Relaying not allowed - sender domain not local in D:\INETPUB\VHOSTS\gaehambuilders.com
Posted
by
Kiran RS
on Programmers
See other posts from Programmers
or by Kiran RS
Published on 2013-11-08T10:02:49Z
Indexed on
2013/11/08
10:18 UTC
Read the original article
Hit count: 1602
Why I'm getting an error like this - Warning: mail() [function.mail]: SMTP server response: 530 Relaying not allowed - sender domain not local in D:\INETPUB\VHOSTS\gaehambuilders.com\httpdocs\contacts.php on line 120 ?
Here is my php code,
if(isset($_POST['send']))
//if "email" is filled out, send email
{
//send email
$name=$_REQUEST['name'];
$email=$_POST['email'];
$cnum=$_REQUEST['cnum'];
$enq=$_REQUEST['enq'];
$email1=$_REQUEST['email'];
$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = $email1;
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
?>
alert ("Enquiry form submited successfully ! We'll get back you soon ");
Thanks in advance!
© Programmers or respective owner